from view.endSrc.tDataset import tDataset
from view.endSrc.tGammaClustersEstimatorBy1D import tGammaClustersEstimatorBy1D
from view.endSrc.tHighDensityFilter import tHighDensityFilter
from view.endSrc.tIniceRunner import tIniceRunner
from view.endSrc.tObserver import tObserver
from view.endSrc.tUser import tUser
from view.endSrc.tGaussianClustersEstimatorBy1D import tGaussianClustersEstimatorBy1D

from view.endSrc.MySqlConn import MySqlConn
from view.endSrc.DBConfig import DBConfig


class InitTables:
    def __init__(self):
        pass

    @staticmethod
    def build():
        sqlConn = MySqlConn(DBConfig())

        t = tDataset(sqlConn)
        t.createTable()
        t = tGammaClustersEstimatorBy1D(sqlConn)
        t.createTable()
        t = tHighDensityFilter(sqlConn)
        t.createTable()
        t = tIniceRunner(sqlConn)
        t.createTable()
        t = tObserver(sqlConn)
        t.createTable()
        t = tGaussianClustersEstimatorBy1D(sqlConn)
        t.createTable()
        t = tUser(sqlConn)
        t.createTable()
        t.createRow('default', 'default_psw')
        t.createRow('adm_default', 'psw08')


if __name__ == '__main__':
    InitTables.build()

